﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Web;
using WLMCoreLibrary;

namespace SAW_Core
{
    public class CurrentSystemUser
    {
        public static string Email { get;set; }
        public static int IdUsuario
        {
            get
            {
                if (HttpContext.Current.Session["idUsuario"] != null) 
                    return Convert.ToInt32(HttpContext.Current.Session["idUsuario"]);
                else
                    return 0;
            }
            set { HttpContext.Current.Session["idUsuario"] = value; }
        }
        public static int NivelUsuario { get;set; }
        public static string UserName { get;set; }


        public static void LogOnUser(MiWebSiteUser usuario)
        {
            NivelUsuario = usuario.nivelUsuario;
            UserName = usuario.username;
            Email = usuario.email;
            IdUsuario = usuario.id;
        }
    }

    class Usuarios
    {
    }
}
